package org.jeecg.modules.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 用户部门
 */
@Data
@TableName("sys_user_depart")
public class SysUserDepart implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 部门id
     */
    private String depId;

    /**
     * 占员额数 1占用 0不占用
     */
    private Integer memberFlag;
    /**
     * 占正职数 1占用 0不占用
     */
    private Integer chiefPosition;
    /**
     * 占副职数 1占用 0不占用
     */
    private Integer deputyPosition;

    /**
     * 占职数 1占用 0不占用
     */
    private Integer position;

    /**
     * 部门下 职务ID
     */
    private String positionId;

    private transient Long total;
    private transient String departName;


    public SysUserDepart(String id, String userId, String depId, Integer memberFlag, Integer chiefPosition, Integer deputyPosition, Integer position, String positionId) {
        super();
        this.id = id;
        this.userId = userId;
        this.depId = depId;
        this.memberFlag = memberFlag;
        this.chiefPosition = chiefPosition;
        this.deputyPosition = deputyPosition;
        this.position = position;
        this.positionId = positionId;
    }


    public SysUserDepart(String id, String userId, String depId) {
        super();
        this.id = id;
        this.userId = userId;
        this.depId = depId;
    }

    public SysUserDepart(String id, String departId) {
        this.userId = id;
        this.depId = departId;
    }
}
